import Vue from 'vue'
import App from './App'
import router from './router'
import SvgIcon from './components/SvgIcon/index.vue'
import SIdentify from './components/Identify/identify'// 验证码
import waterfall from 'vue-waterfall2' // 瀑布流布局插件
import vcolorpicker from 'vcolorpicker'// 颜色选择器
import VueCropper from 'vue-cropper'// 图片剪辑
import vCustomLoading from './directive/v-loading'// 自定义指令
import XEUtils from 'xe-utils' // 通用函数库
import { smallToBig } from './utils'

import './assets/iconfont/iconfont.js'
import 'element-ui/lib/theme-chalk/index.css'
import 'view-design/dist/styles/iview.css'
import 'vant/lib/index.css'

XEUtils.mixin({
    // 扩展函数
    smallToBig
})
window.$xe = XEUtils
// 注册为全局组件
Vue.component('SvgIcon', SvgIcon)
Vue.use(waterfall)// 颜色选择器
Vue.use(vcolorpicker)// 截图插件
Vue.use(vCustomLoading)
Vue.use(VueCropper)
Vue.use(SIdentify)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    components: {
        App
    },
    template: '<App/>'
})
